<!DOCTYPE html>
<html>
    <body>
        <h1 id="p1"></h1>
        <script>
            <!--write可以直接向HTML输出流写内容-->
            document.write(Date());
            document.getElementById("p1").innerHTML="New text!";
            
        </script>
    </body>
</html>